// 23
package main

import (
	"fmt"
)

func main() {
	abundants := make([]int, 0)
	for i := 12; i <= 28123; i++ {
		if isAbundant(i) {
			abundants = append(abundants, i)
		}
	}
	lenght := 0
	for i := 0; i < len(abundants); i++ {
		lenght += i + 1
	}
	sumAbundants := make(map[int]bool)
	for i := 0; i < len(abundants); i++ {
		for j := i; j < len(abundants); j++ {
			sumAbundants[abundants[i]+abundants[j]] = true
		}
	}
	sum := 0
	for i := 1; i <= 28123; i++ {
		if !sumAbundants[i] {
			sum += i
		}
	}
	fmt.Println(sum)
}

func isAbundant(n int) bool {
	sum := 0
	for i := 1; i <= n/2; i++ {
		if n%i == 0 {
			sum += i
		}
	}

	return sum > n
}
